/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TSinais.java
 *
 * Created on 03/03/2012, 15:44:31
 */
package gui;

import controlelrl.Tanque;
import javax.swing.JPanel;
import javax.swing.JTextField;

/**
 *
 * @author Solano
 */
public class TSinais extends javax.swing.JPanel {

    /** Creates new form TSinais */
    public TSinais() {
        initComponents();
        this.setSize(500,400);
    }

    public JTextField getAmpMax() {
        return ampMax;
    }

    public JTextField getAmpMin() {
        return ampMin;
    }

    public void setGraficoPanel(JPanel graficoPanel) {
        this.graficoPanel = graficoPanel;
        this.graficoPanel.setVisible(true);
    }

    public JPanel getGraficoPanel() {
        return graficoPanel;
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        butaoDegrau = new javax.swing.JToggleButton();
        butaoQuadrada = new javax.swing.JToggleButton();
        butaoSeno = new javax.swing.JToggleButton();
        butaoAleatorio = new javax.swing.JToggleButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        ampMax = new javax.swing.JTextField();
        ampMin = new javax.swing.JTextField();
        geraGrafico = new javax.swing.JButton();
        graficoPanel = new javax.swing.JPanel();

        butaoDegrau.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/iconD.jpg"))); // NOI18N

        butaoQuadrada.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/iconQ.jpg"))); // NOI18N
        butaoQuadrada.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                butaoQuadradaActionPerformed(evt);
            }
        });

        butaoSeno.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/iconS.jpg"))); // NOI18N

        butaoAleatorio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/iconAleatorio.png"))); // NOI18N

        jLabel1.setText("Amplitude MAX:");

        jLabel2.setText("Amplitude  MIN:");

        geraGrafico.setText("GERAR GRÁFICO");

        javax.swing.GroupLayout graficoPanelLayout = new javax.swing.GroupLayout(graficoPanel);
        graficoPanel.setLayout(graficoPanelLayout);
        graficoPanelLayout.setHorizontalGroup(
            graficoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 435, Short.MAX_VALUE)
        );
        graficoPanelLayout.setVerticalGroup(
            graficoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(geraGrafico))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(butaoDegrau, 0, 0, Short.MAX_VALUE)
                                .addComponent(butaoQuadrada, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(butaoSeno, 0, 0, Short.MAX_VALUE)
                                .addComponent(butaoAleatorio, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jLabel2)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(ampMin))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jLabel1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(ampMax, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(24, 24, 24)
                .addComponent(graficoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(23, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(81, 81, 81)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(graficoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(ampMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(ampMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(41, 41, 41)
                        .addComponent(butaoDegrau, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(butaoQuadrada, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(butaoSeno, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(butaoAleatorio)))
                .addGap(18, 18, 18)
                .addComponent(geraGrafico)
                .addContainerGap(29, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void butaoQuadradaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butaoQuadradaActionPerformed
        controlelrl.ControleLRL.getInstance().inicializarTanque(Tanque.RECT);
    }//GEN-LAST:event_butaoQuadradaActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField ampMax;
    private javax.swing.JTextField ampMin;
    private javax.swing.JToggleButton butaoAleatorio;
    private javax.swing.JToggleButton butaoDegrau;
    private javax.swing.JToggleButton butaoQuadrada;
    private javax.swing.JToggleButton butaoSeno;
    private javax.swing.JButton geraGrafico;
    private javax.swing.JPanel graficoPanel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    // End of variables declaration//GEN-END:variables
}
